package top.tocchen.bookshop.entity.admin;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

/**
 *
 * 店铺实体类
 *
 * @author tocchen
 * @date 2022/8/11 20:29
 * @since jdk 1.8
 **/
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class ShopEntity implements Serializable {

    static final long serialVersionUID = 202208112029L;

    /** 店铺id */
    private Integer id;
    /** 店铺名称 */
    private String name;
    /** 店铺负责人 */
    private String userName;
    /** 店铺联系电话 */
    private String phone;
    /** 创建时间 */
    private Date createDateTime;
    /** 最后修改时间 */
    private Date updateDateTime;

    /**
     * 简单构造器
     * @param name 店铺名称
     * @param userName 店铺负责人
     * @param phone 店铺联系电话
     */
    public ShopEntity(String name, String userName, String phone) {
        this.name = name;
        this.userName = userName;
        this.phone = phone;
        this.createDateTime = new Date();
        this.updateDateTime = this.createDateTime;
    }
}
